<template>
    <div class="inflate-app">
      <div class="inflate-header">
        <div class="inflate-title">膨胀神券</div>
        <div class="inflate-desc">限时膨胀，神券更大额！</div>
      </div>
      <div class="inflate-card">
        <div class="inflate-amount">
          <span class="before">10元券</span>
          <svg class="arrow" width="40" height="24" viewBox="0 0 40 24">
            <path d="M8 12h24M24 6l8 6-8 6" stroke="#FFB800" stroke-width="3" fill="none" stroke-linecap="round" stroke-linejoin="round"/>
          </svg>
          <span class="after">15元券</span>
        </div>
        <div class="inflate-condition">满30元可用</div>
        <button class="inflate-btn" @click="showModal = true">去膨胀</button>
      </div>
  
      <!-- 膨胀成功弹窗 -->
      <div v-if="showModal" class="inflate-modal-mask" @click="showModal = false">
        <div class="inflate-modal" @click.stop>
          <div class="modal-icon">🎉</div>
          <div class="modal-title">膨胀成功！</div>
          <div class="modal-text">10元券已膨胀成<span class="highlight">15元券</span></div>
          <button class="modal-btn" @click="showModal = false">我知道了</button>
        </div>
      </div>
      <AppFooter />
    </div>
  </template>
  
  <script setup>
  import { ref } from 'vue'
  import AppFooter from '../../components/AppFooter.vue'
  const showModal = ref(false)
  </script>
  
  <style scoped>
  .inflate-app {
    max-width: 750px;
    margin: 0 auto;
    min-height: 100vh;
    background: #fffbe8;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 80px;
  }
  .inflate-header {
    width: 100%;
    background: linear-gradient(90deg, #ffb800 0%, #ff385c 100%);
    border-radius: 0 0 32px 32px;
    padding: 48px 0 32px 0;
    text-align: center;
    color: #fff;
  }
  .inflate-title {
    font-size: 36px;
    font-weight: bold;
    letter-spacing: 2px;
  }
  .inflate-desc {
    font-size: 20px;
    margin-top: 12px;
    opacity: 0.95;
  }
  .inflate-card {
    background: #fff;
    border-radius: 32px;
    box-shadow: 0 8px 32px rgba(255, 184, 0, 0.12);
    margin-top: -40px;
    padding: 48px 32px 32px 32px;
    width: 90%;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .inflate-amount {
    display: flex;
    align-items: center;
    font-size: 32px;
    font-weight: bold;
    color: #ff385c;
    margin-bottom: 16px;
  }
  .inflate-amount .before {
    background: #ffe066;
    color: #ff385c;
    border-radius: 16px;
    padding: 8px 24px;
    margin-right: 12px;
    font-size: 28px;
  }
  .inflate-amount .after {
    background: linear-gradient(90deg, #ffb800 0%, #ff385c 100%);
    color: #fff;
    border-radius: 16px;
    padding: 8px 24px;
    margin-left: 12px;
    font-size: 32px;
    box-shadow: 0 2px 8px rgba(255, 56, 92, 0.08);
  }
  .arrow {
    margin: 0 8px;
  }
  .inflate-condition {
    font-size: 18px;
    color: #999;
    margin-bottom: 32px;
  }
  .inflate-btn {
    width: 80%;
    background: linear-gradient(90deg, #ffb800 0%, #ff385c 100%);
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    border: none;
    border-radius: 32px;
    padding: 18px 0;
    box-shadow: 0 4px 16px rgba(255, 56, 92, 0.12);
    cursor: pointer;
    transition: all 0.2s;
  }
  .inflate-btn:hover {
    opacity: 0.92;
    transform: scale(0.98);
  }
  
  /* 弹窗样式 */
  .inflate-modal-mask {
    position: fixed;
    z-index: 9999;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .inflate-modal {
    background: linear-gradient(135deg, #fffbe8 0%, #fff0f5 100%);
    border-radius: 32px;
    box-shadow: 0 8px 32px rgba(255, 56, 92, 0.18);
    padding: 48px 32px 32px 32px;
    min-width: 320px;
    max-width: 90vw;
    text-align: center;
    position: relative;
  }
  .modal-icon {
    font-size: 48px;
    margin-bottom: 16px;
  }
  .modal-title {
    font-size: 28px;
    font-weight: bold;
    color: #ff385c;
    margin-bottom: 12px;
  }
  .modal-text {
    font-size: 20px;
    color: #333;
    margin-bottom: 32px;
  }
  .modal-text .highlight {
    color: #ffb800;
    font-weight: bold;
    font-size: 24px;
    margin-left: 4px;
  }
  .modal-btn {
    width: 80%;
    background: linear-gradient(90deg, #ffb800 0%, #ff385c 100%);
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    border: none;
    border-radius: 24px;
    padding: 14px 0;
    cursor: pointer;
    transition: all 0.2s;
  }
  .modal-btn:hover {
    opacity: 0.92;
    transform: scale(0.98);
  }
  </style>